package com.itheima.d6_singleInstance;

public class Queue {
    //懒汉式
    private static Queue queue ;

    private Queue(){
        System.out.println("对象创建");
    }

    public static Queue getQueue() {
        if(queue == null){
            queue = new Queue();
        }
        return queue;
    }
}
